home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / basic / optimiz.com / OPTIMIZE.DOC next >
Encoding:
Text File  |  1986-01-16  |  2.0 KB  |  49 lines

  1.         Tired of the same old compiling routine?  You know,
  2.     save your program, then save it as an ASCII file.  After that
  3.     annoying wait, you type SYSTEM, then run whatever batch file
  4.     you have to compile your program.
  5.         How would you like to eliminate that wait and speed
  6.     up execution of your compiled program at the same time?  If so,
  7.     OPTIMIZE is for you.  This program removes all unreferenced
  8.     line numbers, allowing the compiler to optimize "over entire
  9.     blocks of code rather than single lines" (BASIC Compiler
  10.     documentation, p. 42).
  11.         You can enter OPTIMIZE and be prompted through the
  12.     program, or type OPTIMIZE <filename> and automatically optimize
  13.     the specified BASIC program.
  14.         Possibly the easiest way to use OPTIMIZE is copy it
  15.     to your Compiler disk and slightly modify your current batch
  16.     file.  The necessary changes are:
  17.  
  18.         . add a call to OPTIMIZE before the call to BASCOM
  19.         . Specify the /N option in your call to BASCOM
  20.         . Erase the optimized ASCII file after the call to
  21.           BASCOM to free up that space, if desired.
  22.  
  23.     My batch file looks like this:
  24.  
  25.         C:
  26.         A:OPTIMIZE %1
  27.         A:BASCOM %1.OPT,,/X/D/N%2
  28.         ERASE %1.OPT
  29.         A:LINK %1.OBJ
  30.         ERASE %1.OBJ
  31.         A:
  32.  
  33.         The first parameter is the BASIC program name (without
  34.     an extension), the second is for any additional parameters
  35.     you may need occasionally.
  36.  
  37.         In case you still think this may just be a waste of
  38.     time, consider the fact that I found a 20% reduction in both
  39.     execution time and total space for optimized programs.  This
  40.     won't necessarily be true for programs which are compiled
  41.     without the /X and /D options, but some space and time
  42.     reduction is inevitable.
  43.         If you have any problems with the program, you can
  44.     leave a message for me on the Hawkeye PC bulletin board.
  45.     My name is Dave Glowacki, and the number of the bulletin
  46.     board is (319)-363-3314.  I will try to fix whatever errors
  47.     come up, but please remember that it is a free program, so
  48.     don't expect immediate results (or any results for that matter)
  49.